package com.medusa.aps.business.modules.board.mp.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.medusa.aps.business.model.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;

/**
 * <p>车间排产任务统计数据</p>
 * @author An.Yan
 */
@Data
@Accessors(chain = true)
@EqualsAndHashCode(of = {"workshopId", "statisticsDate"})
public class WorkshopProductionStatistics extends BaseEntity<WorkshopProductionStatistics> {

    /**
     * 主键
     */
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 车间id
     */
    private Integer workshopId;

    /**
     * 车间名称
     */
    private String workshopName;

    /**
     * 车间编码
     */
    private String workshopCode;

    /**
     * 已排产设备数量
     */
    private BigDecimal scheduledEquipmentCnt;

    /**
     * 未排产设备数量 scheduled_equipment_cnt
     */
    private BigDecimal unscheduledEquipmentCnt;

    /**
     * 计划数量
     */
    private BigDecimal plannedCnt;

    /**
     * 关联订单数
     */
    private Integer associatedOrderCnt = 0;

    /**
     * 车间创建时间
     */
    private LocalDateTime workshopCreatedTime;

    /**
     * 车间相关维度的各个字段的统计时间
     */
    private LocalDate statisticsDate;

}
